# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-class-loader
_author=VIPUL
_perlmod=Class-Loader
pkgver=2.03
pkgrel=16
pkgdesc='Loads modules and creates objects on demand.'
arch=('any')
url='http://search.cpan.org/~VIPUL/Class-Loader-2.03/'
license=('GPL' 'PerlArtistic')
depends=('perl' 'gmp')
options=(!emptydirs)
source=("http://cpan.perl.org/modules/by-authors/id/V/VI/$_author/$_perlmod-$pkgver.tar.gz")
sha512sums=('1ca245ea55b6fb101c5a6000c833c5a7b6885619811882a693916d4bf9225ecb55127e340647c8d6ff70b18ee5b8ba9f15184c2a70e8b6737762fcd5baf76adc')

build() {
  cd "$_perlmod-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd "$_perlmod-$pkgver"

  make install DESTDIR="$pkgdir"
}

